<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        table{
            border-collapse: collapse;
        }
        td{
            border: 1px solid black;
            text-align: center;
        }
       
    </style>
</head>

<body>
    <div id="app">
        <div>
            <h1>请选择你的登录方式</h1>
            <router-link to="/bd">账号名密码</router-link>
            <router-link to="/tp">二维码</router-link>
            <router-view></router-view>
        </div>
    </div>
    <template id="bd">
        <div>
            <h3>注册信息</h3>
            <table>
                <tr>
                    <td>用户名</td>
                    <td><input type="text"></td>
                </tr>
                <tr>
                    <td>密码</td>
                    <td><input type="password"></td>
                </tr>
                <tr>
                    <td>重复密码</td>
                    <td><input type="password"></td>
                </tr>
                <tr>
                    <td>验证码</td>
                    <td><input type="number"></td>
                </tr>
                <tr>
                    <td colspan="2"><button>注册新用户</button></td>
                </tr>
            </table>
        </div>
    </template>
    <template id="tp">
        <div>
            <h3>扫我二维码</h3>
            <img src="./char.jpg" alt="">
        </div>
    </template>

</body>
<script src="./vue.js"></script>
<script src="./vue-router.js"></script>

<script>
    let bd = {
        template: "#bd"
    }
    let tp = {
        template: "#tp"
    }
    let routerObj = new VueRouter({
        routes: [
            { path: "/bd",  component: bd },
            { path: "/tp",  component: tp },
        ]
    })
    let vm = new Vue({
        el: "#app",
        router: routerObj
    })


</script>

</html>